﻿<UserControl x:Class="Mnk.TBox.Plugins.PasswordsStorage.Settings"
             xmlns:loc="clr-namespace:Mnk.TBox.Plugins.PasswordsStorage.Code.Localization"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:units="clr-namespace:Mnk.Library.WpfControls.Components.Units;assembly=Mnk.Library.WPFControls"
             xmlns:captioned="clr-namespace:Mnk.Library.WpfControls.Components.Captioned;assembly=Mnk.Library.WPFControls"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <DockPanel>
        <GroupBox Header="{loc:Tr PasswordGeneration}" DockPanel.Dock="Bottom" Margin="5" Padding="5">
            <StackPanel Orientation="Horizontal">
                <captioned:CaptionedNumericUpDown Caption="{loc:Tr PasswordLength}" Minimum="6" Maximum="64" Value="{Binding PasswordLength}" Margin="5" />
                <captioned:CaptionedNumericUpDown Caption="{loc:Tr PasswordNonAlphaCharacters}" Minimum="0" Maximum="64" Value="{Binding PasswordNonAlphaCharacters}" Margin="5" />
            </StackPanel>
        </GroupBox>
        <GroupBox Header="{loc:Tr ProfilesList}" Margin="5" Padding="5">
            <units:ListBoxUnit Name="Profile" ItemsSource="{Binding Profiles}" UnitType="Text" Title="{loc:Tr ConfigureProfile}">
                <units:ListBoxUnit.ItemTemplate>
                    <DataTemplate >
                        <DockPanel>
                            <Button Content="..." DataContext="{Binding}" Click="EditProfileClick" DockPanel.Dock="Right"/>
                            <TextBlock Text="{Binding Key}" VerticalAlignment="Center" TextTrimming="CharacterEllipsis"/>
                        </DockPanel>
                    </DataTemplate>
                </units:ListBoxUnit.ItemTemplate>
            </units:ListBoxUnit>
        </GroupBox>

    </DockPanel>
</UserControl>
